package Parse;
import ErrorMsg.ErrorMsg;

public class MainInterface extends Exception{
	  public static void main(String argv[]) {
		    	Yylex scanner = null;
		    	ErrorMsg errorMsg=new ErrorMsg("ErrorDetective");
		        try {
		          scanner = new Yylex( new java.io.FileReader("a.txt"),errorMsg );
		          java_cup.runtime.Symbol symbol;
		          do{
		        	  symbol = scanner.debug_next_token();
		          }
		          while( symbol.sym != sym.EOF );
		        }
		        catch (java.io.FileNotFoundException e) {
		          System.out.println("File not found");
		        }
		        catch (java.io.IOException e) {
		          System.out.println("IO error scanning file");
		          System.out.println(e);
		        }
		        catch (Exception e) {
		          System.out.println("Unexpected exception:");
		          e.printStackTrace();
		        }
		      }
		  }

